import request from '@/utils/request'

// 查询电池溯源记录列表
export function listRootRecord(query) {
  return request({
    url: '/system/rootRecord/list',
    method: 'get',
    params: query
  })
}

// 查询电池溯源记录详细
export function getRootRecord(id) {
  return request({
    url: '/system/rootRecord/' + id,
    method: 'get'
  })
}

// 新增电池溯源记录
export function addRootRecord(data) {
  return request({
    url: '/system/rootRecord',
    method: 'post',
    data: data
  })
}

// 修改电池溯源记录
export function updateRootRecord(data) {
  return request({
    url: '/system/rootRecord',
    method: 'put',
    data: data
  })
}

// 删除电池溯源记录
export function delRootRecord(id) {
  return request({
    url: '/system/rootRecord/' + id,
    method: 'delete'
  })
}
